<!doctype html>
<html lang="en">
<head>
    @include('web.layout.head')
    <link rel="stylesheet" href="{{mix('/css/web/user/shop_info.css')}}">
</head>
<body>
@include('web.layout.header')
@include('web.layout.user_tab')
<div class="base_member_content">
    <div class="w1200">
        @include('web.layout.seller_nav')
        <div class="nav_right flr">
            <div class="base_content">
                <div class="line_title">商铺资料</div>
                <div class="content">
                    <div class="mrtop">
                        <div class="kttime">开通时间：2018-03-21 15:49:56</div>
                        <div class="erjinet"><span>二级域名：</span><span class="showin"><span class="url-text" >100018</span><input type="text" class="url-input" name="url" value="100018"/>.ejing365.com</span><span id="url-edit" class="edit">修改</span><span class="butt">确定</span></div>
                        <div class="fl"><a style="color:#1cade7;margin-left:3em;" href="{{ url('/seller/prove_information')}}">修改资料</a></div>
                        <div class="goodsfabu fr" >
                            <a target="_blank" href="/shop/18943/index">我的商铺</a>
                        </div>
                    </div>
                    <div class="mrbanner">
                        <img src="{{asset('/img/web/user/mrbanner.png')}}">
                    </div>
                    <ul class="mrleimu">
                        <li>供应商品</li>
                        <li>我的客户</li>
                        <li>成交订单</li>
                        <li>成交金额</li>
                    </ul>
                    <ul class="mrleimudt">
                        <li>
                            <a href="/seller/prove_release_list"><div class="num">10</div>
                            <div class="titlele">全部商品</div></a>
                        </li>
                        <li>
                            <div class="num">21</div>
                            <div class="titlele">成交客户</div>
                        </li>
                        <li>
                            <div class="num">123</div>
                            <div class="titlele">成交订单</div>
                        </li>
                        <li>
                            <div class="num">1595.00</div>
                            <div class="titlele">成交金额</div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
@include('web.layout.footer')
<script>
    $(function(){
        $('#url-edit').click(function(){
            $('.url-text').hide();
            $('.url-input').show();
        });
    });
    $('.url-input').change(function(){
        var reg = new RegExp('^[A-z0-9]{2,8}$');
        if(!reg.test($(this).val())){
            layer.alert('必须是长度2~8位的英文字母或者数字组成',{
                icon: 2
            });
            $(this).val($('.url-text').text());
            return false;
        }
        var url = '/seller/change_url';
        $.post(url,{url:$(this).val(),_token:'{{csrf_token()}}'},function(res){
            if(res.code == 0){
                layer.alert('修改成功',{
                    icon: 1
                },function () {
                    location.reload();
                });
                $('.url-text').show();
                $('.url-input').hide();
            }else{
                layer.alert('修改失败',{
                    icon: 2
                });
            }
        },'json');
    });
</script>
</body>
</html>